package com.bum.api.processor.home.html;

import org.apache.commons.lang.StringUtils;

import com.bum.api.core.exp.om.Metas;
import com.bum.api.core.exp.om.Params;
import com.bum.api.core.service.process.ApiProcess;
import com.bum.api.core.service.process.IApiProcess;

public class HomeHtmlProcess extends ApiProcess {
	IApiProcess	homeBumHtmlProcess;

	enum Home {
		bum
	}

	@Override
	public String process(String path, Params params, Metas metas) {
		String[] parts = StringUtils.split(path, "/", 3);
		switch (Home.valueOf(parts[1])) {
			case bum:
				return homeBumHtmlProcess.process(parts.length == 3 ? parts[2] : null, params, metas);
		}

		return null;
	}

	public void setHomeBumHtmlProcess(IApiProcess homeBumHmtlProcess) {
		this.homeBumHtmlProcess = homeBumHmtlProcess;
	}

}
